<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >

<%@ include file="../base/taglibs.jsp" %>
<%@ page session="true"%>

<html>
	<%@ include file="../base/head.jsp" %>

	<body>
		<div id="wrap">
			<%@ include file="../snipped/header.jsp"%>
			
			<div id="content">
				
				<c:if test="${edit}">
				<a href="<c:url value="/band/edit?id=${band.id}" />">Zpět na detail kapely <b><c:out value="${band.name}"/></b></a>
				<br />
				
				<form:form id="form" method="post" modelAttribute="song"  action="songSave">
					
					<%@ include file="../snipped/msgErr.jsp" %>
					
						<h2>Editace písně</h2>
						
						<fieldset>
							<table>
								<tr>
									<td nowrap="nowrap"><form:label path="nameCs">Název CS:</form:label></td>
									<td><form:input path="nameCs" maxlength="100" size="100" /></td>
								</tr>
								<tr>
									<td nowrap="nowrap"><form:label path="nameOriginal">Název orig.:</form:label></td>
									<td><form:input path="nameOriginal" maxlength="100" size="100" /></td>
								</tr>
								<tr>					
									<td><form:label path="arrange">Arranž:</form:label></td>
									<td><form:input path="arrange" maxlength="50" size="50" /></td>
								</tr>
								<tr>
									<td><form:label path="author">Autor:</form:label></td>
									<td><form:input path="author" maxlength="50" size="50" /></td>
								</tr>
								<tr>
									<td><form:label path="description">Popis:</form:label></td>
									<td><form:textarea path="description" cols="85" rows="3" /><br /><small>max. 100 znaků</small></td>
								</tr>
							</table>
						</fieldset>
						
						<p><button type="submit">Uložit</button><form:input path="id" cssStyle="visibility:hidden;" /></p>
						
					</form:form>
				
				</c:if>
				
				<c:if test="${not edit}">
				
				<h2>Detail písně</h2>
				
				<a href="<c:url value="/band/browse?id=${band.id}" />">Zpět na detail kapely <b><c:out value="${band.name}"/></b></a>
				<br />
				
				<table>
					<tr>
						<th>Název CS:</th>
						<td><c:out value="${song.nameCs}"/></td>
					</tr>
					<tr>
						<th>Název orig.:</th>
						<td><c:out value="${song.nameOriginal}"/></td>
					</tr>
					<tr>
						<th>Arranž:</th>
						<td><c:out value="${song.arrange}"/></td>
					</tr>
					<tr>
						<th>Autor:</th>
						<td><c:out value="${song.author}"/></td>
					</tr>
					<tr>
						<th>Popis:</th>
						<td><c:out value="${song.description}"/></td>
					</tr>
				</table>
				
				</c:if>
				
			</div>
			
			<br />
			<%@ include file="../snipped/footer.jsp"%>
		</div>
	</body>
	
</html>